import request from '@/utils/request'

export function grepTreeData(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_BLOG_API}/api/blog/manage/crawl/grep/treeData`,
    method: 'post',
    data: query
  })
}

export function grepSelectData() {
  return request({
    url: `${process.env.VUE_APP_MODULE_BLOG_API}/api/blog/manage/crawl/grep/select`,
    method: 'get'
  })
}

export function crawDefineLoad(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_BLOG_API}/api/blog/manage/crawl/define/load`,
    method: 'get',
    params: query
  })
}

export function crawDefineSave(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_BLOG_API}/api/blog/manage/crawl/define/save`,
    method: 'post',
    data: query
  })
}

export function crawDefineGrep(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_BLOG_API}/api/blog/manage/crawl/define/grep`,
    method: 'get',
    params: query
  })
}

export function crawDefineDelete(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_BLOG_API}/api/blog/manage/crawl/define/delete`,
    method: 'post',
    data: query
  })
}

export function manageTable(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_BLOG_API}/api/blog/manage/table`,
    method: 'post',
    data: query
  })
}

export function manageLoad(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_BLOG_API}/api/blog/manage/load`,
    method: 'get',
    params: query
  })
}

export function manageFeatured(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_BLOG_API}/api/blog/manage/featured`,
    method: 'post',
    data: query
  })
}

export function manageTop(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_BLOG_API}/api/blog/manage/top`,
    method: 'post',
    data: query
  })
}

export function managePublish(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_BLOG_API}/api/blog/manage/publish`,
    method: 'post',
    data: query
  })
}

export function manageDelete(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_BLOG_API}/api/blog/manage/delete`,
    method: 'post',
    data: query
  })
}
